package c.h.a.b0;

import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build.VERSION;
import android.text.TextUtils;
import android.view.View;
import c.b.a.a.a;
import com.liuzh.deviceinfo.DeviceInfoApp;
import java.util.LinkedList;
import java.util.Objects;

/* compiled from: lambda */
public final /* synthetic */ class b implements Runnable {
    public final /* synthetic */ j a;
    public final /* synthetic */ View b;

    public /* synthetic */ b(j jVar, View view) {
        this.a = jVar;
        this.b = view;
    }

    public final void run() {
        j jVar = this.a;
        View view = this.b;
        Objects.requireNonNull(jVar);
        LinkedList linkedList = new LinkedList();
        for (String str : jVar.b) {
            Object obj = null;
            if (!TextUtils.isEmpty(str)) {
                PackageManager b = DeviceInfoApp.c.b();
                boolean z = false;
                try {
                    long longVersionCode;
                    PackageInfo packageInfo = b.getPackageInfo(str, 0);
                    String charSequence = packageInfo.applicationInfo.loadLabel(b).toString();
                    String str2 = packageInfo.applicationInfo.packageName;
                    if (VERSION.SDK_INT >= 28) {
                        longVersionCode = packageInfo.getLongVersionCode();
                    } else {
                        longVersionCode = (long) packageInfo.versionCode;
                    }
                    long j = longVersionCode;
                    StringBuilder i = a.i(DeviceInfoApp.c.getString(2131690546), ": ");
                    i.append(packageInfo.versionName);
                    i.append("(");
                    i.append(j);
                    i.append(")");
                    String stringBuilder = i.toString();
                    ApplicationInfo applicationInfo = packageInfo.applicationInfo;
                    c.h.a.d0.a aVar = new c.h.a.d0.a(applicationInfo, charSequence, str2, stringBuilder, j, applicationInfo.sourceDir);
                    if ((applicationInfo.flags & 1) == 1) {
                        z = true;
                    }
                    aVar.h = z;
                } catch (NameNotFoundException unused) {
                }
            }
            if (obj != null) {
                linkedList.add(obj);
            }
        }
        c.h.a.m0.p.a.b(new a(jVar, linkedList, view));
    }
}
